import Layout from "@/layout"

export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: { title: 'Dashboard', icon: 'dashboard' }
    }]
  },

  /*{
    path: '/userInfoManage',
    name: 'userInfoManage',
    redirect: '/userInfoManage/studentInfoManage',
    component: Layout,
    meta: { title: '用户信息管理', icon: 'dashboard' },
    children: [{
      path: 'studentInfoManage',
      name: 'studentInfoManage',
      component: () => import('@/views/userInfoManage/studentInfoManage'),
      meta: { title: '学生信息管理', icon: 'dashboard' }
    }]
  },*/
  {
    path: '/userInfoManage',
    component: Layout,
    redirect: '/userInfoManage/systemUserManage',
    name: 'UserInfoManage',
    meta: { title: '用户信息管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'systemUserManage',
        name: 'SystemUserManage',
        component: () => import('@/views/userInfoManage/systemUserManage'),
        meta: { title: '系统用户管理', icon: 'table' }
      },
      {
        path: 'studentInfoManage',
        name: 'StudentInfoManage',
        component: () => import('@/views/userInfoManage/studentInfoManage'),
        meta: { title: '学生信息管理', icon: 'table' }
      },
      {
        path: 'teacherInfoManage',
        name: 'TeacherInfoManage',
        component: () => import('@/views/userInfoManage/teacherInfoManage'),
        meta: { title: '教师信息管理', icon: 'table' }
      },
    ]
  },

  {
    path: '/stuJobManage',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuJobManage',
        component: () => import('@/views/stuJobManage/index'),
        meta: { title: '学生就业信息管理', icon: 'el-icon-s-help' },
      }
    ]
  },

  {
    path: '/stuGradeManage',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuGradeManage',
        component: () => import('@/views/stuGradeManage/index'),
        meta: { title: '学生成绩管理', icon: 'el-icon-s-help' },
      }
    ]
  },

  {
    path: '/courseManage',
    component: Layout,
    redirect: '/courseManage/stuCourseManage',
    name: 'CourseManage',
    meta: { title: '课程管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'stuCourseManage',
        name: 'StuCourseManage',
        component: () => import('@/views/courseManage/stuCourseManage'),
        meta: { title: '学生课程管理', icon: 'table' }
      },
      {
        path: 'teaCourseManage',
        name: 'TeaCourseManage',
        component: () => import('@/views/courseManage/teaCourseManage'),
        meta: { title: '教师课程管理', icon: 'table' }
      },
      {
        path: 'publicCourseManage',
        name: 'PublicCourseManage',
        component: () => import('@/views/courseManage/publicCourseManage'),
        meta: { title: '公共选修课管理', icon: 'table' }
      },
    ]
  },

  {
    path: '/stuUserInfo',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuUserInfo',
        component: () => import('@/views/stuUserInfo/index.vue'),
        meta: { title: '个人信息', icon: 'el-icon-s-help' }
      }
    ]
  },

  {
    path: '/course',
    component: Layout,
    redirect: '/course/stuCourse',
    name: 'Course',
    meta: { title: '课程管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'stuCourse',
        name: 'StuCourse',
        component: () => import('@/views/stuCourse/index'),
        meta: { title: '个人课程表', icon: 'table' }
      },
      {
        path: 'selCourse',
        name: 'SelCourse',
        component: () => import('@/views/selCourse/index'),
        meta: { title: '补退选课', icon: 'table' }
      }
    ]
  },

  {
    path: '/stuScore',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuStore',
        component: () => import('@/views/stuScore/index.vue'),
        meta: { title: '成绩查询', icon: 'el-icon-s-help' }
      }
    ]
  },

  {
    path: '/stuEmploy',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuEmploy',
        component: () => import('@/views/stuEmploy/index.vue'),
        meta: { title: '就业信息', icon: 'el-icon-s-help' }
      }
    ]
  },

  {
    path: '/teaUserInfo',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'TeaUserInfo',
        component: () => import('@/views/teaUserInfo/index.vue'),
        meta: { title: '个人信息', icon: 'el-icon-s-help' }
      }
    ]
  },

  {
    path: '/selStuScore',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'SelStuScore',
        component: () => import('@/views/selStuScore/index'),
        meta: { title: '学生成绩管理', icon: 'el-icon-s-help' },
      }
    ]
  },

  {
    path: '/teaStuEmploy',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'StuEmploy',
        component: () => import('@/views/teaEmploy/index'),
        meta: { title: '就业信息管理', icon: 'el-icon-s-help' },
      }
    ]
  },

  {
    path: '/teaCourse',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'TeaCourse',
        component: () => import('@/views/teaCourse/index'),
        meta: { title: '教师课程管理', icon: 'el-icon-s-help' },
      }
    ]
  },

  {
    path: '/fileManage',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'FileManage',
        component: () => import('@/views/fileManage/index'),
        meta: { title: '文件管理', icon: 'el-icon-s-help' }
      }
    ]
  },

  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]
